package com.guit.hrms.mapper;

import com.guit.hrms.po.api.Api;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface ApiMapper {

    /**
     * 根据employeeId和apiId查找api
     * @param roleId
     * @param address
     * @return
     */
    @Select("select * from apis a, role_apis ra where a.id =ra.api_id and a.address = #{address} and ra.role_id = #{roleId}")
    Api verifyApi(Integer roleId, String address);
}
